<?php include_partial('back/show', array('uri' => url_for(array('module' => 'news', 'action' => 'index', 'year' => $year, 'month' => $month, 'title_slug' => $record_slug)))); ?>
<h1 class="title">Editer ce commentaire</h1>

<?php foreach($form as $field => $f): ?>
    <?php $attributes[$field] = array() ?>
  <?php endforeach ?>

  <?php if ($form->hasErrors()): ?>
    <?php foreach($form as $field => $f): ?>
      <?php if($f->hasError()): ?>
        <?php $attributes[$field] = array('class' => 'error') ?>
      <?php endif ?>
    <?php endforeach ?>
    <div class="box_relief red">Certains champs sont incomplets et/ou invalides.</div>
  <?php endif; ?>

<form method="post" action="<?php echo url_for($sf_request->getUri()) ?>" name="edit_comment">
    <table>
        <tr>
            <td></td>
            <td><?php echo $form['body']->renderError(); ?></td>
        </tr>
        <tr>
            <td><?php echo $form['body']->renderLabel('Message : ', $attributes['body']); ?></td>
            <td><?php echo $form['body']->render(); ?></td>
        </tr>
        <tr>
            <td colspan="2"><?php echo $form->renderHiddenFields(); ?></td>
        </tr>
    </table>
    <input type="submit" class="box_relief dark_blue" value="Valider" />
    <p class="mandatoryInformations">(*)Informations obligatoires</p>
</form>